package com.example.server.controller;

import com.example.entity.Village;
import com.example.server.service.VillageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/village")
public class VillageController {
    @Autowired
    VillageService villageService;

    /**
     * 小区信息全查
     * @return
     */
    @GetMapping("/getVillage")
    public List<Village> getVillage(){
        return villageService.getVillage();
    }
}
